package com.nabi.library.contents.elements.page
{
	import com.nabi.library.contents.elements.template.Template;
	import com.nabi.library.events.PageEvent;
	
	import flash.display.DisplayObject;
	import flash.display.Sprite;
	import flash.events.Event;
	
	public class Page extends Sprite implements IPage
	{
		private var m_width:Number, m_height:Number;
		private var m_backgroundColor:uint;
		private var m_pageNumber:int;
		private var m_template:Template;
		
		public function Page()
		{
			super();
			init();
		}
		
		private function init(): void
		{
			m_width = 1024;
			m_height = 768;
			m_backgroundColor = 0xffffff;
			m_pageNumber = 0;
		}
		
		private function redraw(): void
		{
		}
		
		public function Draw($canvas:DisplayObject): void
		{
			
		}
		
		public function Update(): void
		{
		}
		
		public function GetWidth(): Number { return m_width; }
		
		public function SetWidth($value:Number): void
		{
			m_width = $value;
			redraw();
		}
		
		public function GetHeight(): Number { return m_height; }
		
		public function SetHeight($value:Number): void
		{
			m_height = $value;
			redraw();
		}
		
		public function GetPageNumber(): int { return m_pageNumber; }
		
		public function SetPageNumber($value:int): void
		{
			m_pageNumber = $value;
			dispatchEvent(new PageEvent(PageEvent.ChangePage));
		}
	}
}